
FIND_PATH(GMSSL_INCLUDE_DIR sm9.h PATH_SUFFIXES gmssl)

SET(GMSSL_NAMES gmssl)

FIND_LIBRARY(GMSSL_LIBRARY NAMES ${GMSSL_NAMES} )

# handle the QUIETLY and REQUIRED arguments and set GMSSL_FOUND to TRUE if 
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GMSSL DEFAULT_MSG GMSSL_LIBRARY GMSSL_INCLUDE_DIR)

IF(GMSSL_FOUND)
  SET( GMSSL_LIBRARIES ${GMSSL_LIBRARY} )
  SET( GMSSL_INCLUDE_DIRS ${GMSSL_INCLUDE_DIR} )
ELSE(GMSSL_FOUND)
  SET( GMSSL_LIBRARIES )
  SET( GMSSL_INCLUDE_DIRS )
ENDIF(GMSSL_FOUND)

MARK_AS_ADVANCED( GMSSL_LIBRARIES GMSSL_INCLUDE_DIRS )

